"""anjian URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path, include
from django.conf.urls import url
from aj import views
from aj.jgdw import views2
from aj.ajgl import views1
from django.views.static import serve
from django.conf import settings
# 案件管理
anjianguanli_url = [
    path('index/1/', views1.index, ),  # 案件管理系统首页
    path('add/', views1.add, ),  # 立案信息
    path('jie/<int:id>/', views1.jie, ),  # 结案信息
    path('ajlist/', views1.ajlist, ),  # 案件详细列表
    path('ajbb/', views1.ajbb, ),  # 案件报表
    path('del_aj/<int:id>/', views1.del_aj, ),  # 删除案件
    path('upload_jaws/<int:id>/', views1.upload_jaws)  # 上传结案文书或移交文书
]

# 机构队伍管理
jigouduiwuguanli_url = [
    path('index/2/', views2.index, ),  # 机构队伍管理系统首页

    path('regist/', views2.regist, ),  # 执法人员注册
    path('zfry_shtg/<int:id>/', views2.zfry_shtg, ),  # 执法人员审核通过
    path('zfry_shbtg/<int:id>/', views2.zfry_shbtg, ),  # 执法人员审核不通过

    path('jglb/', views2.org_list, ),  # 机构列表
    path('rylb/', views2.ry_list, ),  # 人员列表

    path('edit_grxx/', views2.edit_grxx, ),  # 编辑个人信息
    path('edit_dwxx/', views2.edit_dwxx, ),  # 编辑单位信息

]

urlpatterns = [
    # path('admin/', admin.site.urls),
    path('login/<int:app>/', views.login),  # 登录 app=1 登录案件管理系统，app=2登录机构队伍管理系统
    path('unlogin/<int:app>/', views.unlogin),  # 退出登录

    path(r'', include(anjianguanli_url)),
    path(r'', include(jigouduiwuguanli_url)),

    path('hqdw/<str:sxs>/', views.hqdw),  # 根据省辖市名称返回该省辖市管辖的单位

    url(r'^media/(?P<path>.*)$', serve, {"document_root": settings.MEDIA_ROOT}),

    path(r'test1/',views.test1),
    path(r'test2/',views.test2),
]
